package com.qc.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qc.enity.Goods;

import java.util.Date;



public interface IGoodsService extends IService<Goods> {

    /** 获取冰箱里存储的食材 */
    IPage<Goods> goodsList(String oid, Page page);

    /** 冰箱内食材的搜索 */
    IPage<Goods> goodsSelect(String oid, Page page, String name);

    /** 添加食材（名称，数量，食材描述） */
    Integer addGoods(String oid, String name, Integer num, String goodsDescribe, Date expiration, String unit, String type ,String photoUrl);

    /** 按比例消耗食材 */
    Integer removeGoods(String oid, String goodsId, Integer num);

    int addGoodsByYoLo( String userId );
}
